package com.neusoft.yiyang.common.entity.bed;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.neusoft.yiyang.common.entity.bed.vto.BedBedUsage;
import com.neusoft.yiyang.common.enums.BedStatus;
import lombok.Data;

/**
 * 床位实体类，映射 bed 表
 */
@Data
@TableName("bed")
public class Bed {

    @TableId
    private Integer bedId;

    private Integer buildingNo; // 楼栋号
    private Integer floor; // 楼层
    private String roomNumber; // 房间号
    private Integer bedNo; // 床号
    private BedStatus status; // 床位状态，使用枚举类型
    @TableLogic
    private Integer isDeleted; // 逻辑删除标记

    public Bed() {

    }

    public Bed(BedBedUsage bedBedUsage) {
        this.bedId = bedBedUsage.getBedId();
        this.buildingNo = bedBedUsage.getBuildingNo();
        this.floor = bedBedUsage.getFloor();
        this.roomNumber = bedBedUsage.getRoomNumber();
        this.bedNo = bedBedUsage.getBedNo();
        this.status = bedBedUsage.getStatus();
        this.isDeleted = 0;
    }


}
